import * as ActionTypes from '../../action/types';
import { TAssigneeUserInfo } from '../../../types';

const initAssigneeUserInfo: TAssigneeUserInfo = {
  avatarUrl: '',
  nickName: '',
  openId: ''
};

export const assigneeUserInfoReaducer = (
  state: TAssigneeUserInfo = initAssigneeUserInfo,
  action: any
) => {
  const { type, payload } = action;
  switch (type) {
    case ActionTypes.SET_ASSIGNEEUSERINFO:
      return { ...state, ...payload };
    default:
      return state;
  }
};
export default assigneeUserInfoReaducer;
